class_name NodeState
extends Node

signal transition(state_name: String, data: NodeStateData)

var state_matchine: NodeStateMachine

var _changing_state: bool = false


func transition_state(state_name: String, data: NodeStateData = null):
	_changing_state = true
	transition.emit(state_name, data)


func _on_process(_delta : float) -> void:
	pass


func _on_physics_process(_delta : float) -> void:
	pass


func _on_enter(_data: NodeStateData) -> void:
	pass


func _on_exit() -> void:
	pass


func _allow_repeat_enter() -> bool:
	return false
